(1) Field of the Invention
The present invention relates to a motion vector estimation apparatus for estimating a motion vector of a current block to be coded in a current picture to be coded.
(2) Description of the Related Art
With the advances in semiconductor technology and the like, various coding schemes for video compression have been introduced to home video recorders. In particular, coding schemes such as MPEG-2, MPEG-4 and the like which exploit motion vectors between a number of pictures constituting a video sequence have been widely used.
A motion vector estimation apparatus using such a coding scheme estimates a motion vector between pictures on a block-by-block basis. Particularly, H.264/MPEG-4 AVC gives the encoder the ability to choose which block size, from among a number of block sizes, will be used for the most efficient coding (see, for example, Yoichi Yagasaki, et al., “Jisedai Dogazo Fugoka Hoshiki MPEG4 AVC/H.264 (MPEG-4 AVC/H.264: Next Generation Video Coding Standard)” Mar. 12, 2004). Therefore, differently from the conventional coding scheme using a fixed block size of 16×16 pixels, H.264/MPEG-4 AVC gives flexibility in coding images depending on the properties of the images, and thus better compression ratios can be gained.
As shown in FIG. 1A to FIG. 1D, in H.264/MPEG-4 AVC, each macroblock of 16×16 pixels can be divided into macroblocks of 16×8, 8×16 or 8×8, each of which can have its own motion vector and reference picture. As shown in FIG. 1E to FIG. 1H, each macroblock of 8×8 pixels can further be divided into sub-macroblocks of 8×4, 4×8 or 4×4 pixels.
As mentioned above, when a current picture to be coded is inputted, the conventional motion vector estimation apparatus estimates motion vectors for four types of macroblocks, calculates the prediction errors of predicted images (sum of absolute differences between the original images and the predicted images) predicted based on the reference images and the estimated motion vectors, and selects, as a block size to be used for coding, one of the four types of macroblocks which has the smallest error. Furthermore, if the block size of 8×8 pixels is selected, motion vectors are further estimated for four types of sub-macroblocks, and prediction errors are calculated for these sub-macroblocks. Then, one of the four types of sub-macroblocks which has the smallest error is selected as a block size to be used for coding.
In addition, a motion compensation block size determination method has been proposed in which a block size for motion compensation can be varied depending on edge information included in the image (see, for example, Japanese Laid-Open Patent Application No. 01-69181 Publication). In this motion compensation block size determination method, a picture is divided into small blocks and the number of edges in each small block is obtained. If the number of edges is smaller than a threshold value, these small blocks are combined into larger blocks until the number of edges in each larger block becomes greater than the threshold value, so that that block size is determined to be used for motion compensation.
However, in H.264/MPEG-4 AVC, as described above, since motion vectors are estimated for blocks of different sizes (four candidates as macroblock sizes and four candidates as sub-macroblock sizes) and the optimal block size is selected from among them in order to choose the best prediction method for efficient video coding, there is a problem that a large amount of calculation is required for coding, and thus such coding has a heavy processing load for the calculation and requires a large amount of power.
By the way, image degradation such as a block noise in a scene where there is a large amount of motion between pictures is less noticeable to human eyes than that in a static scene. Therefore, it may be possible to select larger blocks in the scene where image degradation is less noticeable and thus to reduce the amount of coding. However, since the above-mentioned motion compensation block size determination method combines small blocks into larger blocks according to the number of edges in each block, regardless of motion between pictures, smaller blocks are likely to be selected even in the scene where there is a large amount of motion between pictures. Therefore, there is a problem that selection of smaller blocks causes increase in coding amount.